import logging

CONFIG = {
    "sip": {
        "server_ip": "gb28181.example.com",
        "server_port": 5060,
        "domain": "3402000000",
        "device_id": "34020000001320000001",
        "password": "123456",
        "local_port": 5065,
        "expires": 3600,  # 注册有效期
        "heartbeat_interval": 60,  # 心跳间隔
    },
    "media": {
        "rtp_port_range": (10000, 20000),
        "ffmpeg_path": "/usr/bin/ffmpeg",
        "record_dir": "./records"
    },
    "device": {
        "channels": [
            {"id": "34020000001320000001", "name": "主摄像头", "status": "ON"},
            {"id": "34020000001320000002", "name": "入口摄像头", "status": "ON"}
        ],
        "manufacturer": "Acme Inc",
        "model": "IPCam Pro",
        "firmware": "v2.3.5"
    }
}

# 日志配置
logging.basicConfig(
    level=logging.INFO,
    format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
    handlers=[
        logging.StreamHandler(),
        logging.FileHandler('gb_client.log')
    ]
)